API Documentation for dropdown_header Plugin
options : Object
Available options for dropdown_header plugin
Kind: global typedef
Author: Brian Reavis
Param | Type | Default | Description |
---|---|---|---|
[title] | string | "Untitled" | Title of dropdown_header |
[headerClass] | string | "selectize-dropdown-header" | Class of dropdown_header |
[titleRowClass] | string | "selectize-dropdown-header-title" | Class for title row |
[labelClass] | string | "selectize-dropdown-header-label" | Class for label |
[closeClass] | string | "selectize-dropdown-header-close" | Class for dropdown_header close button |
[html] | function | Method for custom rendering of dropdown_header |
Example
$('select').selectize({
plugins: [
{
dropdown_header: {
title: 'Custom title',
headerClass: 'custom-header-class',
labelClass: 'custom-label-class',
closeClass: 'custom-close-class',
html: (data) => {
// data contain all options values
return (
`<a class="${data.labelClass}" title="${data.title}">${data.title}</a>`;
}
}
}
]
});